package au.com.handsunited.service;

import java.util.List;
import java.util.Map;

import au.com.handsunited.model.BaseEntity;
import au.com.handsunited.model.Organisation;
import au.com.handsunited.model.User;
import au.com.handsunited.model.invitations.Invitation;
import au.com.handsunited.model.relationship.Role;

/**
 *
 * @author arunda
 */
public interface OrganisationService {

	Organisation createOrganisation(Organisation organisation, BaseEntity owner, BaseEntity creator);

	Organisation updateOrganisation (Organisation organisation, BaseEntity updater);

	boolean deleteOrganisation(Organisation organisation);

	Organisation getOrganisation (String organisationId);

	Organisation getOrganisation(Long organisationId);

	List<Organisation> getAllOrganisations();

	List<Organisation> searchForOrganisationsByCriteria (Organisation organisationCriteria);

	List<Organisation> searchForOrganisationsByKeywords (String keywords);

	void addMemberToOrganisation (Organisation organisation, BaseEntity member);

	void removeMemberFromOrganisation (Organisation organisation, BaseEntity member);

	void changeMemberRole(Organisation organisation, User admin, User member, Role newRole);

	void inviteOrganisation(User user, String organisationName,
			String contactName, String emailAddress, String message);

	Map<String, List<Invitation>> inviteToOrganisation(Organisation organisation, User user, List<BaseEntity> invitedUsers, String emailAddresses, String message);
}
